From: Richard M. Stallman Date: Mon, 24 May 1993 00:12:05 +0000 (+0000) Subject: (ange-ftp-raw-send-cmd): Allow quitting during accept-process-output. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96060 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c7a464d03dc0880c2542ec06c32c678f9546994b;p=emacs.git (ange-ftp-raw-send-cmd): Allow quitting during accept-process-output. --- diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 4beae0faaaa..821f1801e61 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -859,7 +859,7 @@ SIZE, if supplied, should be a prime number." ;;;; Internal variables. ;;;; ------------------------------------------------------------ -(defconst ange-ftp-version "$Revision: 1.16 $") +(defconst ange-ftp-version "$Revision: 1.17 $") (defvar ange-ftp-data-buffer-name " *ftp data*" "Buffer name to hold directory listing data received from ftp process.") @@ -1682,7 +1682,15 @@ been queued with no result. CONT will still be called, however." (save-excursion (set-buffer (process-buffer proc)) (while ange-ftp-process-busy - (accept-process-output)) + ;; This is a kludge to let user quit in case ftp gets hung. + ;; It matters because this function can be called from the filter. + ;; It is bad to allow quitting in a filter, but getting hung + ;; is worse. By binding quit-flag to nil, we might avoid + ;; most of the probability of getting screwed because the user + ;; wants to quit some command. + (let ((quit-flag nil) + (inhibit-quit nil)) + (accept-process-output))) (setq ange-ftp-process-string "" ange-ftp-process-result-line "" ange-ftp-process-busy t @@ -1708,7 +1716,11 @@ been queued with no result. CONT will still be called, however." nil ;; hang around for command to complete (while ange-ftp-process-busy - (accept-process-output proc)) + ;; This is a kludge to let user quit in case ftp gets hung. + ;; It matters because this function can be called from the filter. + (let ((quit-flag nil) + (inhibit-quit nil)) + (accept-process-output proc))) (if cont nil ;cont has already been called (cons ange-ftp-process-result ange-ftp-process-result-line))))))